package com.joysuch.wwyt.bp.enums;

/**
 * 风险研判
 *
 * @Author ZhangDong
 * @Date 2020/4/17 9:36
 */
public enum RiskJudgeStates {
    //班组+部门
    WAIT_COMMIT(0, "待提交"),
    WAIT_APPROVE(1, "等待审批"),
    NOT_APPROVE(2, "审批不通过"),
    REPORTED(3, "已上报"),

    //公司
    WAIT_ANNOUNCE(4, "等待公示"),
    ANNOUNCE_ING(5, "正在公示"),
    ANNOUNCED(6, "已公示"),
    EXPIRE_NOT_RELEASE(7,"过期未公示"),
    RELEASED(8, "已发布");


    private Integer id;
    private String state;

    RiskJudgeStates(Integer id, String state) {
        this.id = id;
        this.state = state;
    }

    public static String getState(Integer id) {
        RiskJudgeStates[] values = RiskJudgeStates.values();
        for (RiskJudgeStates value : values) {
            if (value.id.equals(id)) {
                return value.state;
            }
        }
        return null;
    }

    public Integer getId() {
        return this.id;
    }

    public String getState() {
        return this.state;
    }
}
